#include<stdio.h>

int fabio(int n)
{
	int i;
	int f1 = 1;
	int f2 = 1;
	int f3 = 1;
	for (i = 3; i <= n; ++i)
	{
		f3 = f1 + f2;
		f1 = f2;
		f2 = f3;
	}
	return f3;
}
int fabio1(int n)
{
	if (n == 1 || n == 2)
	{
		return 1;
	}
	else
	{
		return fabio1(n - 1) + fabio1(n - 2);
	}
}
int main(void)
{
	for (int i = 1; i <= 7; i++)
	{
		printf("%d ", fabio(i));
	}
	printf("\n");
	for (int i = 1; i <= 7; i++)
	{
		printf("%d ", fabio1(i));
	}
	printf("\n");
	return 0;
}